import { EnumRoutePath, EnumRouteTitle } from '@/enum'
import { CustomRoute } from '@/interface'
import { BasicLayout } from '@/layouts'
import { ExceptionOutlined } from '@vicons/antd'
import { RouteNameMap } from '../helpers'

const EXCEPTION: CustomRoute = {
  name: RouteNameMap.get('exception'),
  path: EnumRoutePath.exception,
  component: BasicLayout,
  meta: {
    title: EnumRouteTitle.exception,
    icon: ExceptionOutlined,
  },
  children: [
    {
      name: RouteNameMap.get('exception-403'),
      path: EnumRoutePath['exception-403'],
      component: () => import('@/views/system/exception/Page403.vue'),
      meta: {
        title: EnumRouteTitle['exception-403'],
        keepAlive: false,
        // 如果为 true，则异常页403将不被显示
        notMenu: false,
      },
    },
    {
      name: RouteNameMap.get('exception-404'),
      path: EnumRoutePath['exception-404'],
      component: () => import('@/views/system/exception/Page404.vue'),
      meta: {
        title: EnumRouteTitle['exception-404'],
      },
    },
    {
      name: RouteNameMap.get('exception-500'),
      path: EnumRoutePath['exception-500'],
      component: () => import('@/views/system/exception/Page500.vue'),
      meta: {
        title: EnumRouteTitle['exception-500'],
      },
    },
  ],
}

export default EXCEPTION
